﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;


namespace Qiang.Styles
{
    public class PolygonSymbol : FeatureSymbol, IPolygonSymbol
    {

        #region 初始化


        public PolygonSymbol()
        {
            _styles = new List<IPolygonStyle>();
            _styles.Add(new SimplePolygonStyle());
        }


        #endregion


        #region 属性

        IList<IPolygonStyle> _styles;

        public new IList<IPolygonStyle> Styles
        {
            get { return _styles; }
            set { _styles = value; }
        }


        #endregion


        #region 方法

        /// <summary>
        /// 
        /// </summary>
        /// <param name="g"></param>
        /// <param name="path"></param>
        public void FillPath(Graphics g, GraphicsPath path)
        {
            foreach (IPolygonStyle style in _styles)
            {
                style.FillPath(g, path);
            }
        }

        public void FillRegion(Graphics g, Region region)
        {
            foreach (IPolygonStyle style in _styles)
            {
                style.FillRegion(g, region);
            }
        }


        #endregion


    }
}
